/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.feiyue.basic.reader.data.store;

import com.feiyue.basic.reader.pojo.Content;
import org.json.JSONArray;
import org.json.JSONObject;

public class ContentStore extends Store {
	private static ContentStore instance = null;

	public static ContentStore getInstance() {
		if (instance == null)
			instance = new ContentStore();
		return instance;
	}

	public Content getList() throws Exception {
		JSONObject localJSONObject = new JSONObject(super.load()).optJSONArray(
				"response").optJSONObject(0);
		Content localContent = new Content();
		localContent.setCid(localJSONObject.getString("cid"));
		localContent.setTitle(localJSONObject.getString("title"));
		localContent.setContent(localJSONObject.getString("content"));
		return localContent;
	}
}